﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Javavaj.iHunter.Core
{
    internal class ChannelFactoryWrapper : PluginWrapper , IChannelFactory
    {
        IChannelFactory factory;
        public ChannelFactoryWrapper(IChannelFactory factory)
            :base(factory)
        {
            this.factory = Plugin as IChannelFactory;
           
        }
        #region IChannelFactory 成员

        public IEnumerable<IChannel> ListChannels()
        {
            try
            {
                return factory.ListChannels();
            }
            catch (Exception e)
            {
                OnPluginError(e);
                return null;
            }
        }

        #endregion
    }
}
